🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / androidApp / src / test / kotlin / org / meshtastic / app / CoilImageLoaderLifecycleTest.kt
Displaying Raw • Download
androidApp/src/test/kotlin/org/meshtastic/app/CoilImageLoaderLifecycleTest.kt 65a1f5ce4d0e4b8eafcd0bbfccafd41dc6ee888a (65a1f5ce) Text, 1.98 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.app
Tff7b72import T7ee787androidx.test.core.app.ApplicationProvider
Tff7b72import T7ee787coil3.ImageLoader
Tff7b72import T7ee787coil3.SingletonImageLoader
Tff7b72import T7ee787coil3.annotation.DelicateCoilApi
Tff7b72import T7ee787org.junit.After
Tff7b72import T7ee787org.junit.runner.RunWith
Tff7b72import T7ee787org.koin.android.ext.android.get
Tff7b72import T7ee787org.robolectric.RobolectricTestRunner
Tff7b72import T7ee787org.robolectric.annotation.Config
Tff7b72import T7ee787kotlin.test.Test
Tff7b72import T7ee787kotlin.test.assertSame
Tf0883e@RunWithTb4b4b4(Te6edf3RobolectricTestRunnerTff7b72::Te6edf3classTb4b4b4)
Tf0883e@ConfigTb4b4b4(Te6edf3application Tff7b72= Te6edf3MeshUtilApplicationTff7b72::Te6edf3classTb4b4b4, Te6edf3sdk Tff7b72= Tff7b72[T79c0ff3T79c0ff4Tff7b72]Tb4b4b4)
Tff7b72class T56d364CoilImageLoaderLifecycleTest Tb4b4b4{
Tf0883e@After
Tf0883e@OptInTb4b4b4(Te6edf3DelicateCoilApiTff7b72::Te6edf3classTb4b4b4)
Tff7b72fun Td2a8fftearDownTb4b4b4(Tb4b4b4) Tb4b4b4{
T8b949e// Booting the real Application starts background init on Dispatchers.Default; leaving it running
T8b949e// leaks failures into later tests in this JVM (Robolectric never calls onTerminate).
Te6edf3ApplicationProviderTb4b4b4.Te6edf3getApplicationContextTff7b72<Te6edf3MeshUtilApplicationTff7b72>Tb4b4b4(Tb4b4b4)Tb4b4b4.Te6edf3cancelBackgroundInitTb4b4b4(Tb4b4b4)
Te6edf3SingletonImageLoaderTb4b4b4.Te6edf3resetTb4b4b4(Tb4b4b4)
Tb4b4b4}
Tf0883e@Test
Tff7b72fun Td2a8ffproductionApplicationProvidesConfiguredKoinImageLoaderTb4b4b4(Tb4b4b4) Tb4b4b4{
Tff7b72val Te6edf3application Tff7b72= Te6edf3ApplicationProviderTb4b4b4.Te6edf3getApplicationContextTff7b72<Te6edf3MeshUtilApplicationTff7b72>Tb4b4b4(Tb4b4b4)
Tff7b72val Te6edf3configuredImageLoader Tff7b72= Te6edf3applicationTb4b4b4.Te6edf3getTff7b72<Te6edf3ImageLoaderTff7b72>Tb4b4b4(Tb4b4b4)
Te6edf3assertSameTb4b4b4(Te6edf3configuredImageLoaderTb4b4b4, Te6edf3SingletonImageLoaderTb4b4b4.Te6edf3getTb4b4b4(Te6edf3applicationTb4b4b4)Tb4b4b4)
Tb4b4b4}
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.04s